﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="NoteAdd.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.MessageManage.NoteAdd"
    Title="无标题页" ValidateRequest="false" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" src="../../webeditor/tiny_mce/tiny_mce.js"></script>

    <script type="text/javascript" language="javascript">
        tinyMCE.init({
            // General options
            mode: "textareas",
            theme: "advanced",
            plugins: "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
            // Theme options
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect",
            theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,sub,sup",
            theme_advanced_buttons3: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_resizing: true,
            relative_urls: false, //
            remove_script_host: false, //
            content_css: "Stylesheet.css",
            language: "zh"
        });

        function InsertToEditor(content) {
            tinyMCE.execCommand('mceInsertContent', false, content);
        }
         
         //将选择的收件人信息存入相应位置
         function insertCompanyInfo(companyInfo) 
         {
         
            var varCompanyInfo = companyInfo.split('|');
           
            var companyNames=varCompanyInfo[0];
            var companyIDs=varCompanyInfo[1];       
            var companyID=document.getElementById("ctl00_ContentPlaceHolder1_hfdRecivedPerson");
            var companyName=document.getElementById("ctl00_ContentPlaceHolder1_txtRecivedPerson"); 
            companyName.value=companyName.value+companyNames;
            companyID.value=companyID.value+companyIDs;
            
             
        }
        
        function txtclear()
        {
            document.getElementById("ctl00_ContentPlaceHolder1_hfdRecivedPerson").value="";
            document.getElementById("ctl00_ContentPlaceHolder1_txtRecivedPerson").value="";
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li><a href="MessageAdd.aspx">新增消息</a></li>
            <li class="active"><a href="NoteAdd.aspx">新增公告</a></li>
        </ul>
    </div>
    <div class="maincon">
        <table>
            <tr>
                <th style="width: 100px">
                    <asp:Label ID="lblRecivedPerson" runat="server" Text="收件人："></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txtRecivedPerson" runat="server" Width="345px" CssClass="gray" ToolTip="收件人无法自己输入，只能选择"></asp:TextBox>
                    <asp:HiddenField ID="hfdRecivedPerson" runat="server" />
                    <input id="btnSelectH" type="button" value="选择" style="width: 30px" class="btn" onclick="window.open('RecieverSelect.aspx?flag=4','selectReciever','width=300,height=400,resizable=0,scrollbars=0, status=0, toolbar=0, menubar=0');" />&nbsp;&nbsp;
                    <input id="btnClearReciver" type="button" value="清空" style="width: 30px" onclick="txtclear()"
                        class="btn" />
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblTitle" runat="server" Text="标题："></asp:Label>
                </th>
                <td>
                    <asp:TextBox ID="txtTitle" runat="server" Width="428px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblContent" runat="server" Text="内容："></asp:Label>
                </th>
                <td>
              
                    <FCKeditorV2:FCKeditor ID="txtContent" runat="server"  Height="500"></FCKeditorV2:FCKeditor>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblUpLoad" runat="server" Text="上传附件："></asp:Label>
                </th>
                <td>
                    <a href="../../webeditor/Upload.aspx" target="_blank">上传附件</a>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblSendPerson" runat="server" Text="发件人："></asp:Label>
                </th>
                <td>
                    <asp:Label ID="txtSendPerson" runat="server" Text=""></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" Text="保  存" CssClass="btn" OnClick="btnAdd_Click"  OperateType="编辑"/>
        &nbsp;
        <hz:HzButton ID="btnClear" runat="server" Text="重  置" OnClick="btnClear_Click" CssClass="btn" OperateType="编辑" />
    </div>
</asp:Content>
